package edu.hzit.data.interceptors;

import edu.hzit.data.utils.ResultVO;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
@CrossOrigin
public class UnTokenExceptionHanlder {

    @ExceptionHandler
    @ResponseBody
    public ResultVO exceptionHanlder(Exception e){
        return new ResultVO(1,e.getMessage());
    }

}
